package com.michale.common.annotation;


import com.michale.common.enmus.BusinessType;
import com.michale.common.enmus.OperatorType;
import io.swagger.annotations.ApiModelProperty;

import java.lang.annotation.*;

/**
 * @author Michale
 * @apiNote 自定义操作日志记录注解
 */
@Target({ElementType.PARAMETER, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Log {

    @ApiModelProperty("模块")
    String title() default "";

    @ApiModelProperty("功能")
    BusinessType businessType() default BusinessType.OTHER;

    @ApiModelProperty("操作人类别")
    OperatorType operatorType() default OperatorType.MANAGE;

    @ApiModelProperty("是否保存请求的参数")
    boolean isSaveRequestData() default true;

    @ApiModelProperty("是否保存响应的参数")
    boolean isSaveResponseData() default true;
}
